package com.systemsjr.jrappointment.appointment;

import com.systemsjr.jrappointment.appointment.vo.AppointmentVO;
import com.systemsjr.jrappointment.utils.ServiceUtils;
import com.systemsjr.jrappointment.utils.UIUtils;
import com.systemsjr.jrlib.richclient.BaseItemForm;

public class AppointmentForm extends BaseItemForm<AppointmentVO> {

	public AppointmentForm() {
		super(ServiceUtils.createDefaultAppointment(), "appointmentForm");
	}

	@Override
	protected void doCreateControl() {
		builder.add(sbf.createBoundComboBox("status", AppointmentStatus.literals()), "colSpan=1");
		builder.row();
		builder.add(sbf.createBinding("customer", UIUtils.getCustomerContext()));
		builder.row();
		builder.add(sbf.createBinding("service", UIUtils.getServiceContext()));
		builder.row();
		builder.add("appDate");
		builder.row();
		builder.add(sbf.createBoundComboBox("startHour", UIUtils.getSeries(0, 24, 1)));
		builder.add(sbf.createBoundComboBox("startMinutes", UIUtils.getSeries(0, 60, 5)));
		builder.row();
		builder.add(sbf.createBoundComboBox("endHour", UIUtils.getSeries(0, 24, 1)));
		builder.add(sbf.createBoundComboBox("endMinutes", UIUtils.getSeries(0, 60, 5)));
		builder.row();
		builder.add(sbf.createBinding("invoice", UIUtils.getInvoiceContext()));
		builder.row();
		
		super.endFormCreate(null);
		
	}

}
